package com.yanggu.payment.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.yanggu.payment.config.WeiXinPayConfig;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version V1.0
 * @author: YangGu
 * @date: 2022/5/4 17:55
 * @description:
 */
@Api(tags = "测试控制器")
@RestController
@RequestMapping("/api/test")
public class TestController {

    @Autowired
    private WeiXinPayConfig weiXinPayConfig;

    @GetMapping
    public R test() {
        return R.ok("ok");
    }

    @GetMapping("/test2")
    public R test2() {
        return R.ok(weiXinPayConfig.getMchId());
    }

}
